<?php
// +----------------------------------------------------------------------
// | quanli team
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2020 http://www.fistforward.com/ All rights reserved.
// +----------------------------------------------------------------------
// | Author: create by allen.qiang
// +----------------------------------------------------------------------


/**
 * 基础设置
 * @package  htdocs
 * @subpackage  quanliadmin
 * @author   create by allen.qiang
 */
quanli_require('module/base/system/sysDepartment.class.php');
class pa_basicSetting {

    public function execute() {

        if (isset($_REQUEST['operFlg']) && quanli_is_int($_REQUEST['operFlg'])) {

            switch ($_REQUEST['operFlg']) {

                case 1: //字典分类表查询
                    $this->itemCategoryList();
                    break;

                default:
                    backendError();
                    break;

            }

        } else {

            backendError();

        }

    }
    /**
    * 查询字典分类表信息
    */
    private function itemCategoryList() {

        global $G_PGLOB;

        //add by 2014-12-03 xuhongshun  start
        //实例部门类
        $sysDepartment = new sysDepartment();
        //部门数据
        $department_array = array();

        //递归查询部门数据
        $sysDepartment->searchDepartment( $department_array );

        //生成部门下拉框html代码
        $department_select_html = '';
        $sysDepartment->createDepartmentSelectOptionHtml( $department_array, $department_select_html );
        $G_PGLOB->smarty->assign_by_ref('department_select_html', $department_select_html);
        //add by 2014-12-03 xuhongshun  end

        $G_PGLOB->smarty->assign('edit_permission', $G_PGLOB->has_permission(22));
        $G_PGLOB->smarty->display('system/basicSetting.tpl');

    }

}
